package com.skylin.mysell.service;

import com.skylin.mysell.dto.CartDTO;
import com.skylin.mysell.entities.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author quanlinlin on 2018/12/8 17:27.
 * @version 1.0
 */
@Service
public interface ProductInfoService {

    ProductInfo findOne(String productInfoId);

    /**
     * 查询所有上架商品列表
     *
     * @return
     */
    List<ProductInfo> findUpAll();

    Page<ProductInfo> findAll(Pageable pageable);

    ProductInfo saveOne(ProductInfo productInfo);

    void increaseStock(List<CartDTO> cartDTOList);

    void decreaseStock(List<CartDTO> cartDTOList);


}
